#include<iostream>
using namespace std;
const int N = 5e3 + 10;
int a[N] = { 1 }, b[N] = { 2 }, c[N] = { 1 };
int n;
int len = 1;
void fun()
{
	int jw = 0;
	for (int i = 0; i < len; i++) {
		c[i] = a[i] + b[i] + jw;
		jw = c[i] / 10;
		c[i] %= 10;
	}
	if (jw) {
		c[len] = jw;
		len++;
	}
	for (int i = 0; i < len; i++) {
		a[i] = b[i];
		b[i] = c[i];
	}
}
int main()
{
	cin >> n;
	for (int i = 3; i <= n; i++) {
		fun();
	}
	if (n == 2) {
		cout << 2 << endl;
		return 0;
	}
	for (int i = len - 1; i >= 0; i--) {
		cout << c[i];
	}
	cout << endl;
	return 0;
}